\hypertarget{calibrate_8nxc}{
\section{workspace/WR/Source/calibrate.nxc File Reference}
\label{calibrate_8nxc}\index{workspace/WR/Source/calibrate.nxc@{workspace/WR/Source/calibrate.nxc}}
}


A program used for calibration of the turning angles of our robot. Given the specified power and time R3D3 turns itself around. Given the same power and time the angle also depends on the power of batteries, that is why the calibration algorithm is needed.  


{\ttfamily \#include \char`\"{}utils.h\char`\"{}}\par
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\hypertarget{calibrate_8nxc_a738b9657b067e383cd066d4c7ca6f576}{
\#define {\bfseries CPWR\_\-B}~60}
\label{calibrate_8nxc_a738b9657b067e383cd066d4c7ca6f576}

\item 
\hypertarget{calibrate_8nxc_ae382ea7d9a3437076c5616056836377a}{
\#define {\bfseries CPWR\_\-S}~40}
\label{calibrate_8nxc_ae382ea7d9a3437076c5616056836377a}

\item 
\hypertarget{calibrate_8nxc_ac9341f36c8b85c8d70f06973c2d9a5bd}{
\#define {\bfseries FRONT\_\-MIN}~29}
\label{calibrate_8nxc_ac9341f36c8b85c8d70f06973c2d9a5bd}

\item 
\hypertarget{calibrate_8nxc_acb1164349a1fa4b7052e28f7c7c735d4}{
\#define {\bfseries FFRONTAL\_\-REVT}~300}
\label{calibrate_8nxc_acb1164349a1fa4b7052e28f7c7c735d4}

\item 
\hypertarget{calibrate_8nxc_abda398fa4722b8691dc8c52c733a2814}{
\#define {\bfseries FFRONTAL\_\-RANGLE}~70}
\label{calibrate_8nxc_abda398fa4722b8691dc8c52c733a2814}

\item 
\hypertarget{calibrate_8nxc_aac0491bc7a39228e57b85de235ef59eb}{
\#define {\bfseries LFRONTAL\_\-REVT}~300}
\label{calibrate_8nxc_aac0491bc7a39228e57b85de235ef59eb}

\item 
\hypertarget{calibrate_8nxc_ad19631fb45582ad9441719c376c07c3b}{
\#define {\bfseries LFRONTAL\_\-RANGLE}~60}
\label{calibrate_8nxc_ad19631fb45582ad9441719c376c07c3b}

\item 
\hypertarget{calibrate_8nxc_a623033e48068d57555d513a2d56d0c40}{
\#define {\bfseries RFRONTAL\_\-REVT}~300}
\label{calibrate_8nxc_a623033e48068d57555d513a2d56d0c40}

\item 
\hypertarget{calibrate_8nxc_a70438bca69ec65d9a29a9f120922464d}{
\#define {\bfseries RFRONTAL\_\-RANGLE}~80}
\label{calibrate_8nxc_a70438bca69ec65d9a29a9f120922464d}

\item 
\hypertarget{calibrate_8nxc_a7861c2174f24a87c43840f87f3cf8a14}{
\#define {\bfseries FRONT\_\-TT}~100}
\label{calibrate_8nxc_a7861c2174f24a87c43840f87f3cf8a14}

\item 
\hypertarget{calibrate_8nxc_abac7e3cf78ac568c0622e8497156baf1}{
\#define {\bfseries STAIN\_\-LIGHT}~45}
\label{calibrate_8nxc_abac7e3cf78ac568c0622e8497156baf1}

\item 
\hypertarget{calibrate_8nxc_a23085c5995bfb533de15f749911735ee}{
\#define {\bfseries STAIN\_\-REVT}~500}
\label{calibrate_8nxc_a23085c5995bfb533de15f749911735ee}

\item 
\hypertarget{calibrate_8nxc_aa065f0a3dcd588addce086ed8e16ef21}{
\#define {\bfseries STAIN\_\-RANGLE}~50}
\label{calibrate_8nxc_aa065f0a3dcd588addce086ed8e16ef21}

\item 
\hypertarget{calibrate_8nxc_a0ffed1b076ac2fe20116fa0f0ae633f1}{
\#define {\bfseries SCANS\_\-INTERVAL}~15}
\label{calibrate_8nxc_a0ffed1b076ac2fe20116fa0f0ae633f1}

\item 
\hypertarget{calibrate_8nxc_a3c84fa327c80928102bf5fcd704df9e6}{
\#define {\bfseries GFI\_\-SCANS\_\-INTERVAL}~10}
\label{calibrate_8nxc_a3c84fa327c80928102bf5fcd704df9e6}

\item 
\hypertarget{calibrate_8nxc_ad57e5a239da13ddea4ab2548b177dcf3}{
\#define {\bfseries REACTOR\_\-AHEAD}~50}
\label{calibrate_8nxc_ad57e5a239da13ddea4ab2548b177dcf3}

\item 
\hypertarget{calibrate_8nxc_a900c7579f499cdcaf00704ae6598036a}{
\#define {\bfseries REACTOR\_\-CLOSE}~60}
\label{calibrate_8nxc_a900c7579f499cdcaf00704ae6598036a}

\item 
\hypertarget{calibrate_8nxc_a05ff785034efa7b287ee834f9ccb74f1}{
\#define {\bfseries REACTOR\_\-FOUND}~90}
\label{calibrate_8nxc_a05ff785034efa7b287ee834f9ccb74f1}

\item 
\hypertarget{calibrate_8nxc_ae981e3a47c44d4878baa7c830f5b846a}{
\#define {\bfseries GFI\_\-SFRONTAL\_\-REVT}~1000}
\label{calibrate_8nxc_ae981e3a47c44d4878baa7c830f5b846a}

\item 
\hypertarget{calibrate_8nxc_ae6cb54a3555702c9db09d084dba51143}{
\#define {\bfseries GFI\_\-SFRONTAL\_\-RANGLE}~60}
\label{calibrate_8nxc_ae6cb54a3555702c9db09d084dba51143}

\item 
\hypertarget{calibrate_8nxc_adee1b3613cfe237cecaba8f2d6f8ecdc}{
\#define {\bfseries GFI\_\-SFRONTAL\_\-FWDT}~1600}
\label{calibrate_8nxc_adee1b3613cfe237cecaba8f2d6f8ecdc}

\item 
\hypertarget{calibrate_8nxc_a24ced77f76e8a86e359fd77bc1ab9ce2}{
\#define {\bfseries GFI\_\-MAX\_\-ROT\_\-FAILSAFE}~20}
\label{calibrate_8nxc_a24ced77f76e8a86e359fd77bc1ab9ce2}

\item 
\hypertarget{calibrate_8nxc_acf448a4b51caadc3612dd7fe1e6d989c}{
\#define {\bfseries GFI\_\-MAX\_\-TIME\_\-NOREACT}~70}
\label{calibrate_8nxc_acf448a4b51caadc3612dd7fe1e6d989c}

\item 
\hypertarget{calibrate_8nxc_ab9d3d1049b45438591608c99774c5cba}{
\#define {\bfseries LIGHTFRPORT}~IN\_\-2}
\label{calibrate_8nxc_ab9d3d1049b45438591608c99774c5cba}

\item 
\hypertarget{calibrate_8nxc_a5103b4e7f1559cfe1f24513bd3d797c2}{
\#define {\bfseries LIGHTDOWNPORT}~IN\_\-1}
\label{calibrate_8nxc_a5103b4e7f1559cfe1f24513bd3d797c2}

\item 
\hypertarget{calibrate_8nxc_a73b327cc697b593b06f47bc6915ba9cf}{
\#define {\bfseries SONSIDEPORT}~IN\_\-1}
\label{calibrate_8nxc_a73b327cc697b593b06f47bc6915ba9cf}

\item 
\hypertarget{calibrate_8nxc_a867a2479cd5e144bc98b3e24bd48a79c}{
\#define {\bfseries TOUCHLPORT}~IN\_\-4}
\label{calibrate_8nxc_a867a2479cd5e144bc98b3e24bd48a79c}

\item 
\hypertarget{calibrate_8nxc_ac16330478e7b003e00f37e90e0c5bdf6}{
\#define {\bfseries TOUCHRPORT}~IN\_\-3}
\label{calibrate_8nxc_ac16330478e7b003e00f37e90e0c5bdf6}

\item 
\hypertarget{calibrate_8nxc_a26fd581a2d8a8f58a30535495c8d0843}{
\#define {\bfseries LIGHTFR}~Sensor(LIGHTFRPORT)}
\label{calibrate_8nxc_a26fd581a2d8a8f58a30535495c8d0843}

\item 
\hypertarget{calibrate_8nxc_aadf3c356fd812224ab384f9780155c1a}{
\#define {\bfseries LIGHTDW}~Sensor(LIGHTDOWNPORT)}
\label{calibrate_8nxc_aadf3c356fd812224ab384f9780155c1a}

\item 
\hypertarget{calibrate_8nxc_aec1d71dea61f39acce761840c4ce0d27}{
\#define {\bfseries SONSIDE}~SensorUS(SONSIDEPORT)}
\label{calibrate_8nxc_aec1d71dea61f39acce761840c4ce0d27}

\item 
\hypertarget{calibrate_8nxc_a98c4f75c182ff1c7c6f3fb288f4f3857}{
\#define {\bfseries TOUCHL}~Sensor(TOUCHLPORT)}
\label{calibrate_8nxc_a98c4f75c182ff1c7c6f3fb288f4f3857}

\item 
\hypertarget{calibrate_8nxc_a6537370af17fd38a56bcf670d8db23e3}{
\#define {\bfseries TOUCHR}~Sensor(TOUCHRPORT)}
\label{calibrate_8nxc_a6537370af17fd38a56bcf670d8db23e3}

\item 
\hypertarget{calibrate_8nxc_a4b9906c8adddf636daee1677e3172b90}{
\#define {\bfseries ACTIVE\_\-FRLIGHT}~1}
\label{calibrate_8nxc_a4b9906c8adddf636daee1677e3172b90}

\item 
\hypertarget{calibrate_8nxc_a8ccbe4f289c6182e18589c6f2c6108ee}{
\#define {\bfseries ST\_\-STOP}~0}
\label{calibrate_8nxc_a8ccbe4f289c6182e18589c6f2c6108ee}

\item 
\hypertarget{calibrate_8nxc_abba849981e74e84eb3836d3c03c363a9}{
\#define {\bfseries ST\_\-FWD}~1}
\label{calibrate_8nxc_abba849981e74e84eb3836d3c03c363a9}

\item 
\hypertarget{calibrate_8nxc_a82671cbfd87d61e73ed46e39a25ea515}{
\#define {\bfseries ST\_\-FRONTT}~6}
\label{calibrate_8nxc_a82671cbfd87d61e73ed46e39a25ea515}

\item 
\hypertarget{calibrate_8nxc_a3744009c444a7b62295fa027e1f42a15}{
\#define {\bfseries ST\_\-SCAN}~7}
\label{calibrate_8nxc_a3744009c444a7b62295fa027e1f42a15}

\item 
\hypertarget{calibrate_8nxc_af8e9dc0efb6c5ba062bc1fdace7300be}{
\#define {\bfseries ST\_\-GO\_\-FOR\_\-IT}~90}
\label{calibrate_8nxc_af8e9dc0efb6c5ba062bc1fdace7300be}

\item 
\hypertarget{calibrate_8nxc_a01eb7829648bea6bf8eaa82af9dacddb}{
\#define {\bfseries ST\_\-SCAN\_\-GFI}~91}
\label{calibrate_8nxc_a01eb7829648bea6bf8eaa82af9dacddb}

\item 
\hypertarget{calibrate_8nxc_a1c7e6cd43336e10d60f8c0635e8b7734}{
\#define {\bfseries ST\_\-FINISHED}~100}
\label{calibrate_8nxc_a1c7e6cd43336e10d60f8c0635e8b7734}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{calibrate_8nxc_a9a2af8e2cd81255d3bf384db4a382807}{
task {\bfseries main} ()}
\label{calibrate_8nxc_a9a2af8e2cd81255d3bf384db4a382807}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
A program used for calibration of the turning angles of our robot. Given the specified power and time R3D3 turns itself around. Given the same power and time the angle also depends on the power of batteries, that is why the calibration algorithm is needed. 